/*
* Author:  Greg Nowak and Vaibhav Sharma
* Michigan State University
* 
* This is the implementation of the NFC Wireless Sensor Network Application
*/
#include "StorageVolumes.h"
#include "Timer.h"
#include "NFCWireless.h"
// Configuration Information
configuration NFCWirelessAppC
{

}

// Implementation
implementation
{
  	components MainC, NFCWirelessC, LedsC;
  	components new LogStorageC(VOLUME_LOG, TRUE);
  	components new TimerMilliC() as Timer0;
  	components new TimerMilliC() as Timer1;
  	components new TempSensorC() as Sensor;
    
  	NFCWirelessC -> MainC.Boot;
  	NFCWirelessC.Timer0 -> Timer0;
  	NFCWirelessC.Timer1 -> Timer1;
  	NFCWirelessC.Leds -> LedsC; 

	NFCWirelessC.LogRead -> LogStorageC;
	NFCWirelessC.LogWrite -> LogStorageC;
	
	NFCWirelessC.Read -> Sensor;

    components ActiveMessageC;
    components new AMSenderC(AM_NFCWIRELESS);

    NFCWirelessC.Packet -> AMSenderC;
    NFCWirelessC.AMPacket -> AMSenderC;
    NFCWirelessC.AMSend -> AMSenderC;
    NFCWirelessC.AMControl -> ActiveMessageC;

    components new AMReceiverC(AM_NFCWIRELESS);
    NFCWirelessC.Receive -> AMReceiverC;
}
